package com.wontube.video.pub;

import java.util.Locale;

/**
 * 本项目相关的配置信息
 * @author tanggf(2012-4-10)
 *
 */
public class AppConfig{
	private AppConfig(){		
	}
	
	/** i18n相关的bundle name */
	public static String widgetBundleName = "widget";
	
	public static Locale getLocale(String localName) {
		String language = localName;
		String country = "";
		int index = localName.indexOf('_');
		if (index > -1) {
			language = localName.substring(0, index);
			country = localName.substring(index + 1);
		}
		
		return new Locale(language, country);
	}
}
